package ch.zhaw.cctd.domain;

import java.awt.Point;
import java.util.List;

import ch.zhaw.cctd.domain.player.Player;

/**
 * Interface für alle Shooter Elemente. Shooter Elemente sind Elemente, die durch den ShooterHandler Evaluiert werden sollen und auf Shootable Elemente schiessen können sollen.
 * @author Rolf
 */
public interface Shooter {

	/**
	 * Checks if this shooter has a target to shoot to, which is still alive.
	 */
	public boolean hasTarget();
	/**
	 * Gets the center coordinates of this shooter.
	 */
	public Point getCenter();
	/**
	 * Range of the tower
	 */
	public int getRange();
	/**
	 * assigns a (new) <code>Shootable</code> to shoot at.
	 * As long the <code>Shootable</code> is still alive, {@link #hasTarget()} will return <code>true</code>
	 */
	public void setTarget(Shootable s);
	/**
	 * Spawns a shot at the specified target.
	 */
	public void shoot();
	/**
	 * The amount of damage this shooter does per shot.
	 */
	public int getDamage();
	/**
	 * The owning player.
	 */
	public Player getOwner();
	/**
	 * if a target is assigned and is alive, this will return its target.
	 */
	public Shootable getTarget();
	/**
	 * statistics
	 */
	public void incStatsKill();
	/**
	 * Gets the abilities of this shooter.
	 * <p>Abilities defines which shootables this shooter can shot at. 
	 * ex: if the shooter only has the ability <i>flying</i> it can only shoot at 
	 * <code>Shootable</code>s, which also have the ability <i>flying</i>.</p>
	 */
	public List<String> getAbilityList();
	/**
	 * notifies the shooter, that it's target is hit.
	 */
	public void targetHit(Point hitpoint);
}
